package org.example.service;

import org.example.pojo.*;

import java.util.List;
import java.util.Map;

public interface DepartmentService {
    /**
     * 查询所有部门
     * @return
     */
    List<Department> showDepartmentAllByPage();

    /**
     * 通过用户名搜索查询
     * @param message
     * @return
     */
    List<Department> showDepartmentsByName(String message);

    List<Department> showDepartmentById(Integer dId);

    /**
//     *修改部门
//     * @param department
//     * @return受影响行数
//     */
    boolean updateDepartment(DepartmentRegister departmentRegister);

    /**
     * 通过id删除部门
     * @param dId
     * @return受影响的行数
     */
    int deletDepartment(int dId);

    /**
     * 添加部门
     * @param dpartmentAdd
     * @return 受影响的行数
     */
    boolean addNewDepartment(DpartmentAdd dpartmentAdd);

    /**
     * 查询部门架构
     * @return
     */
    List<Map<String,Object>> showDepartmentArch();

    /**
     * 通过部门名称查询部门负责人
     * @param dName
     * @return员工姓名
     */
    List<DepartmentEmployee> showEmployeeNameByDepartment(String dName);

    /**
     * 通过Id查询员工信息
     * @param eId
     * @return
     */
    DepartmentEmployee showEmployeeById(int eId);

    /**
     * 查询部门Id和name
     * @return
     */
    List<DepartmentIdAndName> showDepartmentIdAndName();

    /**
     *
     * 查询部门等级
     * @return
     */
    List<String> showDepartmentFirst( int dParentId);
}
